﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WOS.Common
{
    public interface IStamped<T>
        where T : IComparable
    {
        T Stamp { get; }
    }

    public static class Stamp
    {
        public static T Best<T, U>(params T[] stamped)
            where T : IStamped<U>
            where U : IComparable
        {
            return stamped.First(x => x.Stamp.Equals(stamped.Max(i => i.Stamp)));
        }
    }
}
